package com.nmc.service.manager.impl;

import java.util.List;

import org.springframework.security.authentication.encoding.PasswordEncoder;

import com.nmc.service.dao.ZonesDao;
import com.nmc.service.manager.ZonesManager;
import com.nmc.service.model.Zones;

/**
 * Implementation of ZonesManager interface.
 * 
 * @author <a href="mailto:matt@raibledesigns.com">Matt Raible</a>
 */
public class ZonesManagerImpl extends GenericManagerImpl<Zones, Long> implements
		ZonesManager {

	private ZonesDao zonesDao;


	public void setZonesDao(ZonesDao zonesDao) {
		this.dao = zonesDao;
		this.zonesDao = zonesDao;
	}

	/**
	 * {@inheritDoc}
	 */
	public Zones getZones(String zonesId) {
		return zonesDao.get(new Long(zonesId));
	}

	/**
	 * {@inheritDoc}
	 */
	public List<Zones> getZoness() {
		return zonesDao.getAllDistinct();
	}

	/**
	 * {@inheritDoc}
	 */
	public Zones saveZones(Zones zones) {

		return zonesDao.saveZone(zones);

	}

	/**
	 * {@inheritDoc}
	 */
	public void removeZones(String zonesId) {
		log.debug("removing zones: " + zonesId);
		zonesDao.remove(new Long(zonesId));
	}

	/**
	 * {@inheritDoc}
	 */
	public List<Zones> search(String searchTerm) {
		return super.search(searchTerm, Zones.class);
	}
}
